@page
@model IndexModel
@{
    ViewData["Title"] = "Home page";
}

<div class="text-center">
    <h1 class="display-4">Welcome</h1>
    <p>Learn about <a href="https://learn.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>

<!-- Steeltoe: Display XML that contains crypto keys used by Data Protection API. -->
<div class="alert alert-secondary">
    <h4>Crypto keys used by Data Protection API</h4>
    <table class="table table-bordered table-primary" style="display: table; table-layout: fixed; width: 100%;">
        <thead>
        <tr>
            <th scope="col">Crypto Key XML</th>
        </tr>
        </thead>
        <tbody>
        @foreach (string dataProtectionKey in Model.DataProtectionXmlCryptoKeys)
        {
            <tr>
                <td>
                    <pre>@dataProtectionKey</pre>
                </td>
            </tr>
        }
        </tbody>
    </table>
</div>

<!-- Steeltoe: Display session state information. -->
<div class="alert alert-secondary">
    <h4>Session state info</h4>
    <table class="table table-bordered table-primary">
        <thead>
        <tr>
            <th scope="col">Instance Index</th>
            <th scope="col">Session ID</th>
            <th scope="col">Session Value</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>@(Model.SessionState?.InstanceIndex ?? "N/A")</td>
            <td>@Model.SessionState?.SessionId</td>
            <td>@Model.SessionState?.SessionValue</td>
        </tr>
        </tbody>
    </table>
</div>
